﻿@model IEnumerable<Testicide.Models.Module>


@{
    ViewBag.Title = "SearchResult";
}
<b>Search Result</b>

    <div class="order">
            @ViewBag.Message
            <br />
            @if(Model.Count()!=0)
                    {
                    <table class="table table-hover">
                        <tr>
                            <th>
                                @Html.DisplayNameFor(model => model.Name)
                            </th>

                            <th>
                                @Html.DisplayNameFor(model => model.Date)
                            </th>
                            <th>
                                @Html.DisplayNameFor(model=>model.ProjectID)
                            </th>
                            <th></th>
                        </tr>

                        @foreach (var item in Model)
                        {
                            <tr>
                                <td>
                                    <a href="@Url.Action("Details","Module", new { id=item.ID })">
                                        @Html.DisplayFor(modelItem => item.Name)
                                    </a>
                                </td>

                                <td>
                                    @Html.DisplayFor(modelItem => item.Date)
                                </td>

                                <td>
                                    @Html.DisplayFor(modelItem => item.ProjectID)
                                </td>

                                <td>
                                    <a href="@Url.Action("Edit","Module", new { id=item.ID })">
                                        <img class="icons" src="~/pictures/edit.png" />
                                    </a>|
                                    <a href="@Url.Action("Delete","Module", new { id=item.ID })">
                                        <img class="icons" src="~/pictures/delete.png" />
                                    </a>
                                </td>
                            </tr>
                        }

                    </table>
            }
        @Html.ActionLink("Back to all Modules", "Index", "Module")
    </div>

